package com.winit.openapi.oauth.manager;

import java.util.List;
import java.util.Map;

import com.winit.common.query.Page;
import com.winit.openapi.oauth.command.QueryClientByDeveloperCommand;
import com.winit.openapi.oauth.vo.APIClientVo;

public interface APIClientManager {

    int insertClient(APIClientVo entity);

    void updateClient(APIClientVo entity);
    
    void deleteClient(Long clientId);
    
    boolean checkExists(Long developerId, String clientName);
    
    int checkClientCode(String clientCode);

    APIClientVo getById(Long clientId);

    APIClientVo selectByClientKey(String clientKey);

    List<APIClientVo> getByDeveloperAccount(String developerAccount);
    
    Page<APIClientVo> findByDeveloper(QueryClientByDeveloperCommand command);
    
    Map<String, APIClientVo> findAll();

    boolean checkLogin(String clientKey, String clientSrcret);

}
